import matplotlib.font_manager as font_manager


if __name__ == "__main__":

    font_list = font_manager.findSystemFonts()
    for font_path in font_list:
        try:
            font_name = font_manager.FontProperties(fname=font_path).get_name()
            print(font_name)
        except RuntimeError as e:
            print(f"Error with font at path {font_path}: {e}")